package org.talend;

public class TalendJobWSProxy implements org.talend.TalendJobWS {
  private String _endpoint = null;
  private org.talend.TalendJobWS talendJobWS = null;
  
  public TalendJobWSProxy() {
    _initTalendJobWSProxy();
  }
  
  public TalendJobWSProxy(String endpoint) {
    _endpoint = endpoint;
    _initTalendJobWSProxy();
  }
  
  private void _initTalendJobWSProxy() {
    try {
      talendJobWS = (new org.talend.TalendJobWSServiceLocator()).getTalendJobWS();
      if (talendJobWS != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)talendJobWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)talendJobWS)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (talendJobWS != null)
      ((javax.xml.rpc.Stub)talendJobWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public org.talend.TalendJobWS getTalendJobWS() {
    if (talendJobWS == null)
      _initTalendJobWSProxy();
    return talendJobWS;
  }
  
  public java.lang.String[][] runJob(java.lang.String[] args) throws java.rmi.RemoteException{
    if (talendJobWS == null)
      _initTalendJobWSProxy();
    return talendJobWS.runJob(args);
  }
  
  
}